#ifndef DRV_RS485_H
#define DRV_RS485_H
#include "stm32f10x.h"

#define RS485_TX_PORT	GPIOA
#define RS485_TX_PIN	GPIO_Pin_2

#define RS485_RX_PORT	GPIOA
#define RS485_RX_PIN	GPIO_Pin_3

#define RS485_TE_PORT	GPIOG
#define RS485_TE_PIN	GPIO_Pin_9

INT8U hw_rs485_init(INT16U baud);
INT16U RS485_write_bytes(INT8U *buf, INT16U size);
INT16U RS485_read_bytes(INT8U *buf, INT16U size, INT32U timeout);

#endif /* DRV_RS485_H */

